﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Main.Master" Inherits="System.Web.Mvc.ViewPage<QuanLyNhaThuoc.Models.ProductModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<form id="form">
    <div class="box box box-success">
        <div class="box-header">
            <h3 class="box-title">
                Thông tin hàng hóa</h3>
            <div class="navbar-header">
                <button type="button" class="navbar-toggle hnq navbar-btn sidebar-toggle" data-toggle="collapse"
                    data-target="#import-info-warehouse">
                    <span class="icon-plus"></span><span class="icon-plus"></span><span class="icon-plus">
                    </span>
                </button>
            </div>
        </div>
        <div class="box-body">
            <div class="collapse navbar-collapse remove-collapse" id="import-info-warehouse">
                <div id="hnq">
                    <table class="table table-bordered" cellpadding="0" cellspacing="0" border="0">
                        <tbody>
                            <tr>
                                <td>
                                    Mã hàng <span style="color: Red">(*)</span>
                                </td>
                                <td style="width: 35%">
                                    <%: Html.TextBoxFor(m => m.productCode, new { @class = "form-control restore-width" })%>
                                </td>
                                <td>
                                    Loại hàng <span style="color: Red">(*)</span>
                                </td>
                                <td>
                                    <%: Html.DropDownListFor(m => m.productTypeID, Model.lstProductType, new { @class = "select-default" })%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Tên hàng <span style="color: Red">(*)</span>
                                </td>
                                <td>
                                     <%: Html.TextBoxFor(m => m.productName, new { @class = "form-control restore-width", @size = 50 })%>
                                </td>
                                <td>
                                   Đơn vị tiền <span style="color: Red">(*)</span>
                                </td>
                                <td>
                                     <%: Html.DropDownListFor(m => m.CCYID, Model.lstCCYID, new { @class = "select-default" })%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Giá mua <span style="color: Red">(*)</span>
                                </td>
                                <td>
                                    <%: Html.TextBoxFor(m => m.Buy, new { @class = "form-control restore-width" })%>
                                </td>
                                <td>
                                    Giá bán <span style="color: Red">(*)</span>
                                </td>
                                <td>
                                    <%: Html.TextBoxFor(m => m.Sell, new { @class = "form-control restore-width" })%>
                                </td>
                            </tr>
                           
                            <tr>
                                <td>
                                    Diễn giải
                                </td>
                                <td colspan="3">
                                    <%: Html.TextAreaFor(m => m.Description, new { @class = "form-control", @rows = "3", @cols = "1" })%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Ảnh minh họa
                                </td>
                                <td colspan="3">
                                    <%: Html.TextAreaFor(m => m.Image, new { @class = "form-control", @rows = "1", @cols = "1" })%>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>    
      </form>
   <div class="row" style="text-align: center">
        <div class="col-sm-12">
            <div class="form-group">
                <div class="btn-toolbar">
                    <button class="btn btn-default" id="btnSave" type="submit" onclick="return Check();">
                        Lưu hàng</button>
                    <button class="btn btn-default" type="button" onclick="window.location.href = '/Category/Product'">
                        Thoát</button>
                </div>
            </div>
        </div>
    </div>

<script src="/Scripts/jquery-1.5.1.js" type="text/javascript"></script>
    <script src="/Scripts/Pharma/jquery.min.js" type="text/javascript"></script>
    <!-- jQuery UI 1.10.3 -->
    <script src="/Scripts/Pharma/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
    
    <!-- Bootstrap -->
    <script src="/Scripts/Pharma/bootstrap.min.js" type="text/javascript"></script>
    <!-- Bootstrap WYSIHTML5 -->
    <script src="/Scripts/Pharma/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"
        type="text/javascript"></script>
    <!-- AdminLTE App -->
    <script src="/Scripts/Pharma/AdminLTE/app.js" type="text/javascript"></script>
    <script src="/Scripts/Pharma/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
    <script src="/Scripts/Pharma/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
    <link href="/Content/themes/Pharma/datatables/dataTables.bootstrap.css" rel="stylesheet"
        type="text/css" />
    <script type="text/javascript">
        $("#tvCategory").addClass("active");
        $("#ulCategory").attr("style", "display:block");
        $("#liProduct").addClass("active");
        
    </script>
    <!-- Validation engine -->
    <link href="/Content/themes/ValidationEngine/validationEngine.jquery.css" rel="stylesheet"
        type="text/css" />
    <script src="/Scripts/Pharma/plugins/ValidationEngine/jquery.validationEngine.js" type="text/javascript"></script>
    <script src="/Scripts/Pharma/plugins/ValidationEngine/jquery.validationEngine-vi.js" type="text/javascript"></script>
    <script src="/Scripts/Pharma/Pharmacy.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            Pharma._bind(["productCode", "productName", "productTypeID", "CCYID", "Buy", "Sell"], "validate");

             $("#btnSave").click(function (e) {
                e.preventDefault();
                Pharma._init();
                if (Pharma._bound_noparam() != false) {
                    window.location.href = "/Transaction/Modify/" + $("#list input:checkbox:checked").val();
                    }
                });
        });       
            
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<%:ViewBag.Title %>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="NavBar" runat="server">
<h1>
        Thêm mới hàng hóa <small>Control panel</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i>Home</a></li>
        <li class="active">Danh mục</li>
        <li class="active">Danh mục hàng hóa</li>
        <li class="active">Thêm mới hàng hóa</li>
    </ol>
</asp:Content>
